﻿using System;

namespace Benecura.Interfaces.Web.Classes.Helper.Extensions
{
    public static class DateTimeXtn
    {
        /// <summary>
        /// Check if the date is Today
        /// </summary>
        /// <param name="date"></param>
        /// <returns></returns>
        public static bool IsToday(this DateTime date)
        {
            return (date == DateTime.Today);
        }

        /// <summary>
        /// Get SQL min date 
        /// </summary>
        /// <param name="date"></param>
        /// <returns></returns>
        public static DateTime SQLMin(this DateTime date)
        {
            return new DateTime(1900, 1, 1);
        }

        /// <summary>
        /// Get SQL max date
        /// </summary>
        /// <param name="date"></param>
        /// <returns></returns>
        public static DateTime SQLMax(this DateTime date)
        {
            return new DateTime(9999, 12, 31);
        }
    }
}